{extend name="layout/common_layout" /}
{block name="body"}
    <!--tab标签-->
<div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">技能管理</li>
            <li class=""><a href="{:url('admin/skilltype/add')}">添加技能</a></li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form layui-form-pane" action="{:url('admin/skilltype/index')}" method="get">
                    <div class="layui-inline">
                        <label class="layui-form-label">所属分类</label>
                        <div class="layui-input-block cids">
                            <select name="type" lay-verify="required">
                                <option>请选择</option>
                                <option value="1"  {if condition="$type==1"} selected="selected"{/if}>应用类型</option>
                                <option value="2"  {if condition="$type==2"} selected="selected"{/if}>项目类型</option>
                                <option value="3"  {if condition="$type==3"} selected="selected"{/if}>开发语言</option>
                                <option value="4"  {if condition="$type==4"} selected="selected"{/if}>开发技能</option>
                                <option value="5"  {if condition="$type==5"} selected="selected"{/if}>产品/中间件</option>
                                <option value="6"  {if condition="$type==6"} selected="selected"{/if}>可担任岗位</option>
                                <option value="7"  {if condition="$type==7"} selected="selected"{/if}>需求类型</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button class="layui-btn">搜索</button>
                    </div>
                </form>
                <hr>

                <table class="layui-table">
                    <thead>
                    <tr>
                        <th style="width: 30px;">ID</th>
                        <th>类型</th>
                        <th>名称</th>
                        <th>图片（正面）</th>
                        <th>图片（反面）</th>
                        <th>状态</th>
                        <th>创建时间</th>
                        <th>修改时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach name="list" item="vo"}
                    <tr>
                        <td>{$vo.st_id}</td>
                        <td>
                            {if condition="$vo.st_type eq 1"}应用类型{/if}
                            {if condition="$vo.st_type eq 2"}项目类型{/if}
                            {if condition="$vo.st_type eq 3"}开发语言{/if}
                            {if condition="$vo.st_type eq 4"}开发技能{/if}
                            {if condition="$vo.st_type eq 5"}产品/中间件{/if}
                            {if condition="$vo.st_type eq 6"}可担任岗位{/if}
                            {if condition="$vo.st_type eq 7"}需求类型{/if}
                        </td>
                        <td>{$vo.st_name}</td>
                        {if condition="$vo.st_photo_just != ''"}
                            <td><img src="{$vo.st_photo_just}" alt="" style="width: 20px; height: 20px;"></td>
                        {else/}
                        <td></td>
                        {/if}
                        {if condition="$vo.st_photo_back != ''"}
                        <td><img src="{$vo.st_photo_back}" alt="" style="width: 20px; height: 20px; background-color: #0C0C0C"></td>
                        {else/}
                        <td></td>
                        {/if}
                        <td>{php}echo $vo['st_status'] == 1 ? '启用': '禁用';{/php}</td>
                        <td>{$vo.st_create_time|date="Y-m-d H:i:s",###}</td>
                        <td>{$vo.st_update_time|date="Y-m-d H:i:s",###}</td>
                        <td>
                            <a href="{:url('admin/skilltype/edit',['id'=>$vo['st_id']])}" class="layui-btn layui-btn-normal layui-btn-mini">详情</a>
                            <a href="{:url('admin/skilltype/editstatus',['id'=>$vo['st_id'], 'status' => $vo['st_status']])}" class="layui-btn layui-btn-danger layui-btn-mini ajax-confim">{php}echo $vo['st_status']==2 ? '启用' : '禁用';{/php}</a>
                            <a href="{:url('admin/skilltype/delete',['id'=>$vo['st_id']])}" class="layui-btn layui-btn-danger layui-btn-mini ajax-delete">删除</a>
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
                <!--分页-->
                {$list->render()}
            </div>
        </div>
</div>
{/block}